package org.research.sdbx.datetime;

import java.util.Calendar;

public enum DayOfWeek {

	SUNDAY(Calendar.SUNDAY),
	MONDAY(Calendar.MONDAY),
	TUESDAY(Calendar.TUESDAY),
	WEDNESDAY(Calendar.WEDNESDAY),
	THURSDAY(Calendar.THURSDAY),
	FRIDAY(Calendar.FRIDAY),
	SATURDAY(Calendar.SATURDAY);
	
	private int value;
	
	private DayOfWeek(int value) {
		this.value = value;
	}
	
	
	public static DayOfWeek valueOf(int value){
		
		switch (value) {
		case Calendar.SUNDAY:
			return SUNDAY;
		case Calendar.MONDAY:
			return MONDAY;
		case Calendar.TUESDAY:
			return TUESDAY;
		case Calendar.WEDNESDAY:
			return WEDNESDAY;
		case Calendar.THURSDAY:
			return THURSDAY;
		case Calendar.FRIDAY:
			return FRIDAY;
		case Calendar.SATURDAY:
			return SATURDAY;
		default:
			throw new TimeExpcetion();
		}
	}
	
}
